<template>
    <div>
      <Action ref="edit"/>
    </div>
  </template>
  
  <script setup>
  import Action from './Action.vue';
  const edit = ref(null)
  const beforeRouteEnter = (path) => {
    edit.value.beforeRouteEnter(path)
  }
  defineExpose({
    beforeRouteEnter
  })
  </script>
  <script>
  export default {
    beforeRouteEnter(to, from, next) {
      next((e)=>{
        e.beforeRouteEnter(from.path)
      })
    },
  }
  </script>
  <style lang="less" scoped>
  
  </style>